import { createStorage } from "./storage";

const prefixKey = "GIN_BLOG_ADMIN_";

export const createLocalStorage = function (options = {}) {
  return createStorage({
    prefixKey: options.prefixKey || "",
    storage: localStorage,
  });
};

export const createSessionStorage = function (options = {}) {
  return createStorage({
    prefixKey: options.prefixKey || "",
    storage: sessionStorage,
  });
};

export const lStorage = createLocalStorage({ prefixKey });
export const sStorage = createSessionStorage({ prefixKey });
